<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditMusicTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditMusicLabel_musicId}" for="musicId" />
                    <h:inputText id="musicId" value="#{musicController.selected.musicId}" title="#{bundle.EditMusicTitle_musicId}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_title}" for="title" />
                    <h:inputText id="title" value="#{musicController.selected.title}" title="#{bundle.EditMusicTitle_title}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_description}" for="description" />
                    <h:inputTextarea rows="4" cols="30" id="description" value="#{musicController.selected.description}" title="#{bundle.EditMusicTitle_description}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_authorIds}" for="authorIds" />
                    <h:inputText id="authorIds" value="#{musicController.selected.authorIds}" title="#{bundle.EditMusicTitle_authorIds}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_singerIds}" for="singerIds" />
                    <h:inputText id="singerIds" value="#{musicController.selected.singerIds}" title="#{bundle.EditMusicTitle_singerIds}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_createTime}" for="createTime" />
                    <h:inputText id="createTime" value="#{musicController.selected.createTime}" title="#{bundle.EditMusicTitle_createTime}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_userCreateId}" for="userCreateId" />
                    <h:inputText id="userCreateId" value="#{musicController.selected.userCreateId}" title="#{bundle.EditMusicTitle_userCreateId}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_enable}" for="enable" />
                    <h:inputText id="enable" value="#{musicController.selected.enable}" title="#{bundle.EditMusicTitle_enable}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_typeId}" for="typeId" />
                    <h:inputText id="typeId" value="#{musicController.selected.typeId}" title="#{bundle.EditMusicTitle_typeId}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_avatarImageLink}" for="avatarImageLink" />
                    <h:inputText id="avatarImageLink" value="#{musicController.selected.avatarImageLink}" title="#{bundle.EditMusicTitle_avatarImageLink}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_sourceFile}" for="sourceFile" />
                    <h:inputText id="sourceFile" value="#{musicController.selected.sourceFile}" title="#{bundle.EditMusicTitle_sourceFile}" />
                    <h:outputLabel value="#{bundle.EditMusicLabel_fileTypeId}" for="fileTypeId" />
                    <h:inputText id="fileTypeId" value="#{musicController.selected.fileTypeId}" title="#{bundle.EditMusicTitle_fileTypeId}" />
                </h:panelGrid>
                <h:commandLink action="#{musicController.update}" value="#{bundle.EditMusicSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditMusicViewLink}"/>
                <br />
                <h:commandLink action="#{musicController.prepareList}" value="#{bundle.EditMusicShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditMusicIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
